package cn.yshujia.transform;

import cn.yshujia.domain.entity.Router;
import cn.yshujia.domain.vo.RouterVO;

/**
 * @author YShuJia
 * @create 2024/4/23
 * @description 实体转换
 */

public class RouterTransform {

	public static RouterVO entity2VO(Router router) {
		if (router == null) {
			return null;
		}
		RouterVO routerVO = new RouterVO();
		routerVO.setId(router.getId());
		routerVO.setRoleId(router.getRoleId());
		routerVO.setTitle(router.getTitle());
		routerVO.setName(router.getName());
		routerVO.setLevel(router.getLevel());
		routerVO.setPriority(router.getPriority());
		routerVO.setIsAdmin(router.getIsAdmin());
		routerVO.setIsBar(router.getIsBar());
		routerVO.setParentId(router.getParentId());
		routerVO.setIsFrame(router.getIsFrame());
		routerVO.setPath(router.getPath());
		routerVO.setIcon(router.getIcon());
		routerVO.setComponent(router.getComponent());
		routerVO.setStatus(router.getStatus());
		return routerVO;
	}
}